package com.gzkemays.demo.common;

import com.gzkemays.demo.service.RedisService;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * @author gzkemays
 * @date 2021/3/18 17:29
 */
@Component
public class RedisCommon {
  @Resource private RedisService redisService;
  public static RedisCommon redisCommon;

  @PostConstruct
  public void init() {
    redisCommon = this;
    redisCommon.redisService = this.redisService;
  }

  public static String getTokenByClient(String appId) {
    return redisCommon.redisService.getTokenWithAppId(appId);
  }
}
